package com.rjwh.dingdong.client.util;

import com.rjwh.dingdong.client.constant.LocalConstant;

/**
 * Created by Kay on 2016-6-15.
 */
public class PicPathUtil {

    /**
     * 获取图片连接
     *
     * @param url 服务器返回链接
     * @return
     */
    public static String getPicUrl(String url) {
        StringBuilder buffer = new StringBuilder();
        if (url.startsWith("http")) {
            return url;
        } else {
            return buffer.append(LocalConstant.BASE_FILE_URL).append(url).toString();
        }
    }
}
